home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / CRS / crs06.d81 / nonlindc.seq < prev    next >
Text File  |  2009-10-10  |  12KB  |  194 lines

  1.                                 NONLIN DOC FILE
  2.  
  3. PURPOSE:  NONLIN determines the best straight or curved line to  fit  a  set  of
  4. data points by a process known as  nonlinear  least-squares  curve-fitting.   It
  5. then prints the parameter values that define the curve  and  plots  the  results
  6. using one of several formats.  The program  readily  determines  the  best  line
  7. through a group of points, the rate constant of an  exponential  decay  process,
  8. the Km and Vmax (or Kd and  N)  of  a  saturable  process,  and  solves  related
  9. problems for up to seven unknown parameters.
  10.  
  11. ANALYSES SUPPORTED:  Data may be analyzed according to three basic equations:
  12.  
  13.   POLYNOMIALS:  Polynomial curves are defined by the equation:
  14.  
  15.     Y = B(1) + B(2)*X + B(3)*X^2 + B(4)*X^3 + B(5)*X^4 + B(6)*X^5 + B(7)*X^6    
  16.  
  17.   Where B(1), B(2), etc. are the unknown parameters which will be  optimized  to
  18.   the data.  From two to seven parameters can be fitted to  the  data.   In  its
  19.   simplist form (two parameters), the equation defines  a  straight  line  where
  20.   B(1) is the Y intercept and B(2) is the slope,  and  the  analysis  is  called
  21.   linear regression.  If more than two parameters are selected, the result is  a
  22.   curve and the analysis is called nonlinear regression.  Parameters  are  added
  23.   in the order that they appear in the above equation.   Most  smoothly  varying
  24.   data can be fit to this equation if a sufficient number of parameters is used.
  25.  
  26.  
  27.   EXPONENTIALS:  Exponential curves are defined by the equation:
  28.  
  29.     Y = B(1)*e^(B(2)*X) + B(3)*e^(B(4)*X) + B(5)*e^(B(6)*X) + B(7)              
  30.  
  31.   where  X  is  typically  time  and  Y  is  typically  a  number,   amount   or
  32.   concentration.  Again, from 2 to 7  parameters  can  be  fitted.   For  a  two
  33.   parameter fit, the computer determines B(1) (the initial value of Y for X = 0)
  34.   and B(2) (the exponential rate constant, which is negative for decay processes
  35.   and positive for exponential growth).  The  result  is  a  single  exponential
  36.   curve.  When 4 or 6 parameters are fitted, the result is the  sum  of  two  or
  37.   three exponential curves.  When an odd number of parameters is  selected,  the
  38.   final parameter is treated as a constant (e.g., its value does not change with
  39.   time, as in the case of the  7th  parameter  in  the  above  equation).   This
  40.   equation is useful for fitting exponential  decay  (e.g.,  radioactivity)  and
  41.   growth (e.g., population) data.
  42.  
  43.   HYPERBOLAS:  This equation has the form:
  44.  
  45.     Y = (B(1)*X)/(B(2)+X) + (B(3)*X)/(B(4)+X) + (B(5)*X)/(B(6)+X) + B(7)*X      
  46.  
  47.   where X is typically concentration and Y  is  typically  the  velocity  of  an
  48.   enzyme.  When binding of ligand to a receptor or binding protein is studied, X
  49.   is the "free" and Y is the "bound" concentration respectively.  The  resulting
  50.   value of B(1) is the Vmax or concentration of binding sites, and B(2)  is  the
  51.   Km of the enzyme or Kd of the receptor or binding protein.  Data can be fit to
  52.   the sum of  two  or  three  saturable  processes  by  selecting  four  or  six
  53.   parameters, respectively.  If an odd number of  parameters  is  selected,  the
  54.   last parameter (e.g., B(3),  B(5)  or  B(7))  is  treated  as  a  nonsaturable
  55.   process: B(i)*X.  Examples are nonspecific binding or a nonenzymatic  reaction
  56.   rate.
  57.  
  58. DATA ENTRY:  After selecting which equation to use, you must enter the data.  Up
  59. to 100 data pairs can be entered.  If a mistake is made, scan  and  correct  the
  60. data with the up/down cursor and delete keys.   After  entering  the  last  data
  61. pair, enter "E" in place of the next X value.  You will be asked if you wish  to
  62. accept the data.  If not, the computer will review each entry to allow errors to
  63. be found and corrected.  You will next be asked if you want to  save  the  data.
  64. Saved files can be loaded by entering "L" in place of an  X  value  during  data
  65. entry, and will overwrite previous data.  If you forget the name of  your  file,
  66. enter "D" to display the directory.  The Cardco numeric keypad is  supported  on
  67. the C-64 version of this program.
  68.  
  69. NUMBER OF PARAMETERS:  You will then specify the number of parameters (2 - 7) to
  70. be fitted to the data.  This number must be less (ideally, much less)  than  the
  71. number of data points.  Fits using large numbers of  parameters  typically  take
  72. much longer and require higher quality data for meaningful results.  In general,
  73. it is wise to start with two or three parameters, and then add  parameters  only
  74. if needed.
  75.  
  76. WEIGHTING POWER:  This number specifies the "weight" that is  given  to  each  Y
  77. value in the analysis.  A weighting power of two is used when the standard error
  78. of the mean (SEM) of each Y value (i.e., the uncertainty in the true value of Y)
  79. is proportional to Y, as is commonly true.  A value of zero weights  all  points
  80. equally, and is appropriate when the  standard  error  is  effectively  constant
  81. regardless of the value of Y.  Use of  zero  weighting  under  other  conditions
  82. tends to overemphasize the importance of large values of Y.  When  high  quality
  83. data are available the weighting factor has little effect.
  84.  
  85. X OFFSET:  In exponential time curves, it is  sometimes  useful  to  subtract  a
  86. constant from all  measured  times.   The  results  will  reflect  this  change,
  87. although the data are printed and saved unchanged.  Enter zero for no offset.
  88.  
  89. INITIAL ESTIMATES:  Initial estimates of the expected values for each  parameter
  90. must be provided.  These may be very approximate, but accurate  estimates  speed
  91. the analysis and are essential when many parameters are being  fitted.   If  the
  92. experiment has been done  previously,  enter  the  earlier  results.   Extremely
  93. inaccurate initial estimates may lead to an  error  condition  during  analysis.
  94. When this happens, the screen border turns  red  and  the  program  attempts  to
  95. recover by reducing the values of all parameters and  restarting  the  analysis.
  96. Such  results  may  occasionally  be  inaccurate  and  should  be  validated  by
  97. reanalysis.  Inaccurate extimates may rarely cause to program to home on a local
  98. rather than global solution.  If a result does not appear reasonable, repeat the
  99. analysis with a better starting estimate.
  100.  
  101. ANALYSIS:  The analysis is automatic.  Current parameter  values  are  displayed
  102. along with the current sum of the squares.  The data and current  best-fit  line
  103. can be viewed during the analysis by holding down the space bar or F3, F5, F7 or
  104. F2, but only if a Simon's Basic cartridge is installed.  When further  reduction
  105. in the sum of the squares is not possible, the results are output to the screen.
  106. If the analysis does not terminate within a reasonable time or the  sum  of  the
  107. squares is not decreasing, output can be forced by holding down the "F" key.
  108.  
  109. OUTPUT:  Values are listed for each parameter  along  with  the  standard  error
  110. (uncertainty) of that value, presented both as  an  absolute  amount  and  as  a
  111. percentage.  Large uncertainties (over 40%) indicate that  too  many  parameters
  112. have  been  selected  for  fitting,  that  the  data  are  being  fitted  to  an
  113. inappropriate equation, or that the quality of the data is poor.  Also  provided
  114. are the weighted and unweighted sum of the squares, the standard  error  of  the
  115. analysis and the coefficient of determination (the  square  of  the  correlation
  116. coefficient).  These values provide a measure of the quality of the fit, and are
  117. useful in determining  the  best  equation  and  minimum  number  of  parameters
  118. necessary to fit the data.
  119.  
  120. PRINTOUT:  Results can be printed by pushing the "P" key.  A label of up  to  60
  121. characters can be added.  This should work with most printers on the serial bus.
  122. Pressing RETURN sends a line feed and the  UP  ARROW  sends  a  form  feed.   If
  123. everything is printed on the same line or other problems exist, try changing the
  124. secondary address sent to the printer by pressing "S".  If your printer  is  not
  125. device #4, other numbers may be selected by pressing "N".
  126.  
  127. PLOTTING THE DATA:  Graphic features  (only)  require  that  the  Simon's  Basic
  128. cartridge be inserted in the cartridge slot.  Push F3 for a linear plot, F5  for
  129. a log plot, F7 for a double-reciprocal (Lineweaver-Burke) plot,  and  F2  for  a
  130. Scatchard plot of the data.  The best fit line will be drawn automatically.   If
  131. you prefer that all points be joined by line segments, hold down "L"  while  the
  132. data points are being plotted.  To plot the data points without any  line,  hold
  133. down "D".  Holding down any key will suppress printing the numeric data  to  the
  134. screen.
  135.  
  136. SETTING PLOT LIMITS:  Plot scaling is automatic.  The X = 0 and Y = 0  axes  are
  137. shown as dotted lines if they occur within the  plot  area.   To  set  the  plot
  138. limits manually, hold down the function key used to  select  the  plot  until  a
  139. screen appears.
  140.  
  141. SCREEN DUMP:  Pressing F2 will dump the hires Simon's  screen  to  the  printer.
  142. This is known to work with  the  Gemini  10x  and  SG-10  printers  with  Cardco
  143. interfaces, and may  work  with  other  Epson-like  printers  although  this  is
  144. untested.
  145.  
  146. ENDING THE ANALYSIS:  Three options are available when the analysis is complete.
  147. 1.  Pressing "Q" will quit the program and return you  to  Basic  (this  is  the
  148. *only* method, and also works during the  analysis).   2.   Pressing  F6  allows
  149. reanalysis of the same data  set  (for  example,  with  a  different  number  of
  150. parameters).  3.  Pressing F8 resets the program for entry of new data.   During
  151. data entry, if any of the new entries is unchanged, pressing return will reenter
  152. it automatically.
  153.  
  154. PRINCIPLES OF OPERATION:  This program finds the best values of  the  parameters
  155. by successive approximation.  Matrix inversion is used  to  solve  a  system  of
  156. partial differential equations for the parameter values  expected  to  give  the
  157. lowest values for the sum of the squares.  The parameters are then  adjusted  to
  158. these new values and minor adjustments made to further improve  the  fit  (these
  159. steps are labelled "iteration" and "subiteration" respectively).   This  process
  160. is repeated until further improvement is not possible.  Standard error estimates
  161. for each parameter are then found by determining the sensitivity of the  sum  of
  162. the squares to small changes in the value of the parameter.
  163.  
  164. SUMMARY OF COMMANDS:
  165.  
  166.   C       Disk command
  167.   D       Plot only data (Hold down during plotting)
  168.   E       Edit data set
  169.   F       Force results  (Hold down during analysis)
  170.   G       Display graphic screen
  171.   L       Connect points (Hold down during plotting)
  172.   N       Change printer device number
  173.   P       Send results to printer
  174.   Q       Quit
  175.   S       Change secondary address sent to printer
  176.   T       Display prior text screen
  177.  <^>      Send formfeed to printer
  178.  <F1>     Redisplay parameter values of last analysis
  179.  <F3>     Linear Plot (Hold down to set limits)
  180.  <F5>     Log Plot (Hold down to set limits)
  181.  <F7>     Double Inverse Plot (Hold down to set limits)
  182.  <F2>     Scatchard Plot
  183.  <F4>     Screen dump to printer
  184.  <F6>     Reanalyze same data set
  185.  <F8>     Reset to opening screen
  186.  <SPACE>  Display current best-fit line (hold down during analysis)
  187.  <RETURN> Send linefeed to printer
  188.  
  189. COPYRIGHT NOTICE:  Copyright 1985 by Richard A. Weisiger.  All rights  reserved.
  190. Permission is granted  to  duplicate  this  program  for  personal  use  and  to
  191. distribute it through electronic data bases provided both the  program  and  the
  192. opening screen are not altered.  This program may not be  sold.   Please  notify
  193. the author of any errors (Compuserve user # 75015,260  or  write  University  of
  194. California, San Francisco, CA 94143).